package it.robbocca.backup.wifi.preferences;


import it.robbocca.backup.smb.R;
import it.robbocca.backup.wifi.parameter.BackupType;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.widget.RadioButton;
import android.widget.RadioGroup;

public class SettingsActivity extends PreferenceActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        addPreferencesFromResource(R.xml.preference);
        System.out.println("creata preference");
        
    }
    
   
    
    
//    @Override
//   	protected void onStop() {
//   		// We need an Editor object to make preference changes.
//   	      // All objects are from android.context.Context
//   		
//   		rGroupBackUpType=(RadioGroup) findViewById(R.id.rGroupBackupType);
//   		
//   		int selectedId = rGroupBackUpType.getCheckedRadioButtonId();
//   		 
//   		// find the radiobutton by returned id
//   	    rButtonBackUuType = (RadioButton) findViewById(selectedId);
//   	    parameters.setBackupType(BackupType.valueOf(rButtonBackUuType.getText().toString()));
//   		
//   	      SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
//   	      SharedPreferences.Editor editor = settings.edit();
//   	      
//   	      editor.putString("folder", parameters.getFolder());
//   	      editor.putString("server", parameters.getServer());
//   	      editor.putString("backType", parameters.getBackupType().name());
//
//   	      // Commit the edits!
//   	      editor.commit();
//   		super.onStop();
//   	}
}